home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows 95 API Bible
/
Windows 95 API Bible 3 Disc Set.iso
/
Win32 API Bible Book 1 of 3.iso
/
chapte24
/
ex1.c
next >
Wrap
C/C++ Source or Header
|
1995-07-04
|
1KB
|
32 lines
#include <genstub.c>
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_COMMAND: // Process menu options.
switch ( LOWORD( wParam ) )
{
case IDM_TEST: // Show results of GetTickCount()
{ // and GetCurrentTime() in a message box.
TCHAR szBuffer[65];
wsprintf( szBuffer,
"GetTickCount: %lu. GetCurrentTime: %lu",
GetTickCount( ), GetCurrentTime( ) );
MessageBox( hWnd, szBuffer,
"GetTickCount() Example", MB_OK );
}
break;
case IDM_EXIT:
DestroyWindow( hWnd );
break;
}
break;
case WM_DESTROY:
PostQuitMessage( 0 );
break;
default:
return (DefWindowProc(hWnd, uMsg, wParam, lParam));
}
return (NULL);
}